import 'package:fluro/fluro.dart';
import 'package:fluro/src/fluro_router.dart';
import 'package:test_flutter/common/base/IRouter.dart';
import 'package:test_flutter/page/navigator_page.dart';

///登录路由
class LoginRouter extends IRouter {
  static String loginPage = "/login/loginPage";

  @override
  void initFluroRouter(FluroRouter fluroRouter) {
    fluroRouter.define(loginPage, handler: Handler(handlerFunc: (_, params) {
      print("init login router params:$params");
      String username = params[MyNavLoginPage.bundleKeyUserName]?.first ?? "";
      String password = params[MyNavLoginPage.bundleKeyPassword]?.first ?? "";
      return MyNavLoginPage(username, password);
    }));
  }
}
